<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN">
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<title>IupRefresh</title>

<link rel="stylesheet" type="text/css" href="../../style.css">
</head>
<body>

<h2>IupRefresh</h2>
<p>Updates the size and layout of all controls in the same dialog. </p>
<p>To be used after changing size attributes, or 
attributes that affect the size of the control. Can be used for any element inside a 
  dialog, but the layout of the dialog and all controls will be updated. It can change the layout of all the controls inside the dialog because 
  of the dynamic layout positioning. </p>
<h3>
Parameters/Return</h3>
<pre>void IupRefresh(Ihandle *<strong>ih</strong>); [in C]
iup.Refresh(<strong>ih</strong>: ihandle) [in Lua]</pre>
<p><b>ih</b>: identifier of the interface element.</p>
<h3>Notes</h3>
<p>Can be used for any control, but it will always affect the whole dialog. Can 
be called even if the dialog is not mapped.</p>
<p>To refresh the layout of only a subset of the dialog use
<a href="iuprefreshchildren.html">IupRefreshChildren</a>.</p>
<p>After the layout is computed, the position and size attributes are all 
updated. If the elements are mapped then they are immediately repositioned, if the dialog is visible then the 
change will be immediately reflected on the display.</p>
<p>This function will NOT change the size of 
  the dialog, <strong>except</strong> if the SIZE or RASTERSIZE attributes of the dialog where changed before the call. 
For instance, if you also want to change the size of the dialog then you can do:</p>
<pre>IupSetAttribute(dialog, &quot;SIZE&quot;, ...);
IupRefresh(dialog);</pre>
<p>So the dialog will be resized for the new <b>User</b> size, if the new size is NULL the dialog will be resized to 
  the <b>Natural</b> size that include all the elements.</p>
<p>Changing the size of elements without changing the dialog size may position some controls outside the dialog area at 
  the left or bottom borders (the elements will be cropped at the dialog borders 
by the native system).</p>
<p><strong>IupMap</strong> also updates the dialog layout, but only when called 
for the dialog itself, even if the dialog is already mapped. Since 
  <strong>IupShow</strong>, 
  <strong>IupShowXY</strong> and 
  <strong>IupPopup</strong> call 
  <strong>IupMap</strong>, then they all will always update the dialog layout 
before showing it, even also if the dialog is already visible.</p>
<h3>See Also</h3>
<p><a href="../attrib/iup_size.html">SIZE</a>, <a href="iupmap.html">IupMap</a>,
<a href="iuprefreshchildren.html">IupRefreshChildren</a></p>

</body>

</html>
